package com.elegantmall.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SalesReportDTO {
    
    // 报告生成时间
    private Date generatedTime;
    
    // 报告涵盖的时间段
    private Date startDate;
    private Date endDate;
    
    // 总销售额
    private double totalSales;
    
    // 总订单数
    private int totalOrders;
    
    // 最受欢迎的商品（按销量排序）
    private List<PopularProductDTO> popularProducts;
    
    // 各类别销售数据
    private List<CategorySalesDTO> categorySales;
    
    // 销售趋势数据（按日期统计）
    private Map<String, Double> salesTrend;
    
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PopularProductDTO {
        private String goodsId;
        private String goodsName;
        private int totalSold;
        private double totalRevenue;
        private String category;
    }
    
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class CategorySalesDTO {
        private String category;
        private int totalSold;
        private double totalRevenue;
        private double percentageOfTotal;
    }
} 